<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>

<link rel="stylesheet" href="/css/bootstrap.min.css">
<script src="/js/jquery-1.10.2.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/layer.js"></script>
<link rel="stylesheet" href="/css/layer.css">
<script type="text/javascript" th:inline="javascript">
$(function(){
	var error = [[${errorMsg}]];
	if(typeof(error)!='undefined' && error!=''&& error!=null){
		layer.open({
			content : error,
			skin : 'msg',
			time : 2
		//2秒后自动关闭
		});
	}
});
</script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-sm-8 col-sm-offset-2">
				<h2>
					<strong>绑定后接收推送消息</strong>
				</h2>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-6 col-sm-offset-3">
				<form role="form" action="/wxgzh/login" method="post" class="login-form">
					<div class="form-group">
						<input type="text" name="loginName" placeholder="用户名"
							class="form-username form-control" id="loginName">
					</div>
					<div class="form-group">
						<input type="password" name="password" placeholder="密码"
							class="form-password form-control" id="password">
					</div>
					<button type="submit" class="btn btn-primary btn-block">登录</button>
				</form>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" >
	$(function() {
		$('.login-form').on(
				'submit',
				function(e) {
					var flag = false;
					$(this).find('input[type="text"], input[type="password"]')
							.each(function() {
								if ($(this).val() == "") {
									flag = true;
								}
							});
					if (flag) {
						layer.open({
							content : "用户名密码不能为空",
							skin : 'msg',
							time : 2
						//2秒后自动关闭
						});
						return false;
					}
				});

	})
</script>
</html>